Positioning control method

ABSTRACT

A position of an object is controlled based on a distance YS until the object is stopped, a target velocity VS of the object, acceleration time ta for accelerating the object, deceleration time td for decelerating the object, velocity variation ΔVa within the acceleration time, and velocity variation ΔVd within the deceleration time, and a deceleration-start distance YSd. The distance YSd is a distance from where the object is made to start deceleration. The distance YSd is a sum of an integer part YSdq and a decimal part YSdr of the deceleration-start distance. Thus, management of decimal fractions is performed with respect to a pulse generation unit that outputs an output pulse corresponding to the velocity instruction.

TECHNICAL FIELD

[0001] The present invention relates to a method of controlling,employed in stepping motors or servomotors, a position of an object.

BACKGROUND ART

[0002] As the first background art relating to the positioning controlmethod, for example, a technique described in Japanese PatentApplication Laid-Open No. 4-172506 can be mentioned. In this technique,when an object is to be shifted to a specified position, the object isaccelerated up to a target velocity, shifted at the target velocity,then decelerated and stopped, to thereby perform positioning. Theacceleration time at that time is set for each time frame (obtained bydividing a target distance by a target velocity).

[0003] With regard to this control method, an example in which thedistance (instructed distance) of the object is 400 [pulses], and thetarget velocity is 50 per unit time [pulse/sec] is explained below.

[0004] The distance 400 [pulses] is divided by the target velocity 50[pulses/sec], to thereby divide the distance into 8 unit time frames Ato H, respectively having the distance of 50 [pulses].

[0005] Acceleration time is specified for the respective unit timeframes. Here, when the same acceleration time (5 seconds) is assumed forall time frames, the distance 50 [pulses] in the unit time frame A isuniformly divided into the acceleration time 5 seconds, and reallocatedto continuous five unit time frames A, B, C, D, and E by 10 [pulses], inorder of the unit time frame A as a top.

[0006] Similarly, reallocation is sequentially performed, with the timeframe to be reallocated shifted backwards by one, for the distance 50[pulses] of the respective unit time frames (B to F, C to G, . . .).When the reallocated time frame is not 5 unit time, a unit time framehaving a distance 0 [pulse] is newly added, and reallocated.

[0007] When reallocation is finished, the reallocated distance is summedup for each unit time frame, to realize the initially specified shift.

[0008] As the second background art, a technique described in JapanesePatent Application Laid-Open No. 11-220364 can be mentioned. In thistechnique, the velocity control of the object is realized by generatingan output pulse having an optional frequency proportional to an optionalset value.

[0009] In this control method, at first, the number of times ofacceleration within the acceleration time is determined according to theset rate of acceleration, and when the expected value agrees with thenumber of times the object is accelerated, the velocity is switched to aconstant rate, and thereafter, decelerated with the same gradient asthat of the acceleration.

[0010] As the third background art, there is a positioning controlmethod, in which the distance of the object is allocated in anacceleration region, a constant rate (target velocity) region, and adeceleration region, and the velocity change is performed by comparingthe current value (the distance that the object has been shifted) withthe instructed distance for each control cycle.

[0011] In this control method, when acceleration is performed for eachof predetermined control cycles, and the target velocity (or thedistance in the acceleration region) is attained, constant-rate shift isperformed at the target velocity. During this time, a comparison is madebetween the current value and the deceleration-start distance (obtainedby subtracting the distance allocated to the deceleration region fromthe instructed distance) for each control cycle. When the current valuereaches the deceleration-start distance, deceleration up to the targetposition is started, to thereby perform deceleration for each controlcycle.

[0012] In the first and second background art, the deceleration timedepends on the acceleration time, and only the deceleration time cannotbe changed. Therefore, there is a problem in that it cannot deal withdemands of performing positioning control of a machine slowly, with onlythe deceleration time extended, according to the desire of a user.

[0013] In the second background art, the distance is not taken intoconsideration, and since a method for determining the deceleration-startdistance is not described, there is a problem in that accuratepositioning cannot be performed.

[0014] In the third background art, calculation of distance with respectto the acceleration region, the target velocity region, and thedeceleration region must be performed on a computing unit (or CPU) sidethat outputs the velocity instruction for each control cycle, and hencethe load on the computing unit (or CPU) increases.

[0015] In the third background art, since a comparison of distance ismade for each control cycle, it is quite unusual that the current valueagrees with the deceleration-start distance at a break in the controlcycle, and in most cases, the current value reaches thedeceleration-start distance during the control cycle. Therefore, thereis a problem in that optimization of the control cycle must be performedin order to start deceleration at an optimum timing.

[0016] In the third background art, when acceleration, constant rate anddeceleration are to be switched, the current value (the velocity atwhich the object is moving) is compared with the target velocity,thereby causing a problem in that when the velocity value to be comparedincreases, the number of comparison circuits and gates also increases,and a large memory space is required for storing the distance allocatedto the acceleration region, the constant rate region, and thedeceleration region.

[0017] Therefore, it is an object of the present invention to provide apositioning control method capable of setting of the deceleration timeindependently of the acceleration time, and capable of performingaccurate positioning.

[0018] It is another object of the present invention to provide apositioning control method for suppressing the load on the computingunit, and capable of reducing the number of circuits and gates, andmemory space.

[0019] The positioning control method according to the presentinvention, in which an object is accelerated up to a target velocity VS,and then decelerated, to thereby perform position control of the objectat a position shifted by a predetermined distance YS, by providing anoutput pulse of a frequency corresponding to an instructed velocity Vpto the object, includes a deceleration-start distance calculation stepof executing processing for obtaining a deceleration-start distance YSd,being a distance until deceleration of the object is started, and beinga sum of an integer part YSdq of the deceleration-start distance and adecimal part YSdr of the deceleration-start distance, separately foreach of the integer part YSdq and the decimal part YSdr, with theinteger part YSdq being in a unit of one pulse of the output pulse, andthe decimal part YSdr being in a unit of 1/D1 pulse, when it is assumedthat a control frequency is denoted by fc, the minimum velocity of theoutput pulse is denoted by 1/n, the number of seconds is denoted by n,and D1=fc×n, before executing acceleration control of the object; and adeceleration-start point judgment step of judging a point in time when avalue obtained by counting the output pulse becomes equal to or greaterthan the integer part YSdq obtained above, and the result of addition θ1obtained by adding a velocity set value (VP×n) for each 1/fc timebecomes equal to or greater than the value YSdR obtained by rounding offthe decimal part YSdr to the nearest integer, as a deceleration starttime, and starting deceleration from the judgment point.

[0020] At the deceleration-start distance calculation step, thedeceleration-start distance YSd is calculated by subtracting a shifteddistance Yd in the deceleration interval from the distance YS, and theshifted distance Yd in the deceleration interval is calculated bysubtracting a distance decreased than that of the constant rate bydeceleration, from the distance when the object is shifted bydeceleration time td at the target velocity VS.

[0021] At the deceleration-start distance calculation step, when it isassumed that the object is decelerated by a velocity variation ΔVd foreach time interval Δtd (=td/αd, αd; division number), during thedeceleration time td, the deceleration-start distance YSd is calculatedbased on the calculation of the number of (ΔVd×Δtd), by using acomputational expression of arithmetic series.

[0022] The integer part YSdq and the YSdR obtained by rounding off thedecimal part YSdr to the nearest integer of the deceleration-startdistance are determined by the following equations: $\begin{matrix}{{YSdq} = {{quotient}\quad {{of}\left( {{2 \times f\quad c \times n \times {YS}} -} \right.}}} \\{{\left( {{2 \times {VS} \times n} - {\Delta \quad {Vd} \times n \times \left( {{\alpha \quad d} + 1} \right)}} \right) \times}} \\{{{\left. {\Delta \quad t\quad d \times \alpha \quad d} \right)/\left( {2 \times f\quad c \times n} \right)} \geq {0\quad\lbrack{pulse}\rbrack}};}\end{matrix}$ $\begin{matrix}{{YSdR} = {{quotient}\quad {{of}\left( {{surplus}\quad {{of}\left( {{2 \times f\quad c \times n \times {YS}} -} \right.}} \right.}}} \\{{\left( {{2 \times {VS} \times n} - {\Delta \quad {Vd} \times n \times \left( {{\alpha \quad d} + 1} \right)}} \right) \times}} \\{{{\left. {\left. {\Delta \quad t\quad d \times \alpha \quad d} \right)/\left( {2 \times f\quad c \times n} \right)} \right)/2} \geq {0\quad\left\lbrack {\left( {1/\left( {f\quad c \times 2} \right)} \right)\quad {pulse}} \right\rbrack}},}\end{matrix}$

[0023] where the minimum velocity of the output pulse is multiplied by nin order to display the minimum velocity of the output pulse in aninteger, the minimum velocity is expressed by 1 [(1/n) pulse/sec], ndenotes the number of seconds, and αd is a division number ofdeceleration time td into Δtd/fc [(1/fc) sec].

[0024] The positioning control method further comprises an accelerationand constant rate step of changing the frequency of the output pulse tothereby accelerate the velocity of the object until the velocity of theobject reaches the target velocity VS, and thereafter driving the objectat the target velocity VS, which is a step executed after thedeceleration-start distance calculation step and before the decelerationstart time judgment step.

BRIEF DESCRIPTION OF DRAWINGS

[0025]FIG. 1 is a flowchart of the positioning control method accordingto an exemplary embodiment of the present invention; FIG. 2 is a blockdiagram of a positioning apparatus that employs the positioning controlmethod according to the embodiment of the present invention; FIG. 3shows the relationship between the output waveform of a pulse generatorand an result of addition θ1; FIG. 4 shows the relationship between thevelocity of an object and time; and FIG. 5 shows the details ofdeceleration portion in FIG. 4.

BEST MODE FOR CARRYING OUT THE INVENTION

[0026] First Embodiment

[0027]FIG. 1 is a flowchart of the positioning control method accordingto a first embodiment of the present invention. FIG. 2 is a blockdiagram of a positioning apparatus that employs the positioning controlmethod according to the first embodiment of the present invention.

[0028] Here, a pulse that does not come up to one pulse is defined as apulse of decimal fraction, and in the pulse of the deceleration-startdistance YSd, being a distance until starting deceleration, the pulsehaving a unit of one pulse is designated as an integer part YSdq of thedeceleration-start distance YSd, and the pulse of decimal fraction isdesignated as a decimal part YSdr of the deceleration-start distanceYSd. In other words, the decimal part is treated as integer by unitconversion. For example, when the control cycle is designated as 1/fc,the unit is set to 1/(fc×n) pulse.

[0029] One obtained by rounding off the decimal part YSdr of thedeceleration-start distance YSd to the nearest integer is expressed asYSdR, so that the result of addition θ1 (integer) from a variablefrequency pulse generation circuit 9 in FIG. 2 can be compared with thedecimal part YSdr (decimal fraction) of the deceleration-start distanceYSd.

[0030] In FIG. 2, reference numeral 8 denotes an arithmetic circuithaving a computing unit or a CPU that performs calculation of thedeceleration-start distance YSd for controlling the velocity of theobject and provides a velocity instruction of the object to the variablefrequency pulse generation circuit 9. Reference numeral 9 denotes thevariable frequency pulse generation circuit that outputs pulses based onthe velocity instruction from the arithmetic circuit 8.

[0031] Reference numeral 10 denotes a position control circuit having: aunit that compares the YSdq that determines the integer part of thedeceleration-start distance YSd and a value obtained by counting theoutput pulse of the variable frequency pulse generation circuit 9; aunit that compares the YSdR obtained by rounding off the YSdr to thenearest integer that determines the decimal part of thedeceleration-start distance YSd and the result of addition θ1 from thevariable frequency pulse generation circuit 9; a unit that provides adeceleration signal for controlling the velocity of the object to thevariable frequency pulse generation circuit 9, based on these comparisonresults; and a unit that provides a stop signal for stopping the outputpulse of the variable frequency pulse generation circuit 9, to thevariable frequency pulse generation circuit 9, when the value obtainedby counting the output pulse of the variable frequency pulse generationcircuit 9 agrees with the distance YS until the object is stopped.

[0032] How the variable frequency pulse generation circuit 9 generatesthe pulses (hereinafter, “pulse generation method”) is explained below.

[0033]FIG. 3 shows the relationship between the output waveform of thevariable frequency pulse generation circuit 9 and the result of additionθ1. The variable frequency pulse generation circuit 9 comprises anadder, a comparator, a subtracter (or an arithmetic program) and thelike, and determines a value of the output pulse (0 or 1) by acomparison between the result of addition θ1 of the adder and tworeference values D1 and D2 as shown in FIG. 3, to generate a pulse.

[0034] The adder adds a velocity set value Vp×n to an initial value ofthe adder (it is not always 0) for each 1/fc (fc: control frequency Hz)time, and the result of addition is designated as θ1. By repeating thisfor each 1/fc time, to compare the result of addition θ1 and the tworeference values D1 and D2 by the comparator. When the result ofaddition θ1 becomes D2=(fc×n)/2 (n: optional number), the logical valueof the output pulse becomes 1, and when D1 becomes fc×n, the logicalvalue of the output pulse becomes 0, to thereby generate the outputpulse.

[0035] When the result of addition θ1 reaches D1, the subtractersubtracts D1 from the result of addition θ1, in order to preventoverflow of the adder. By repeating this, pulses are generated andoutput. Therefore, by changing the value of the velocity set value Vp×nset in the adder, the velocity (frequency of the pulse) can be changed.

[0036] The operation of the positioning control apparatus will beexplained now while referring to the flowchart in FIG. 1.

[0037] At step S1, the distance YS until the object is stopped (the areaenclosed by a thick line) as shown by 14 in FIG. 4, target velocity VSof the object, bias velocity (obtained by raising the bottom line of theconstant velocity such as initial velocity and terminal velocity) VB ofthe object, acceleration time ta for accelerating the object,deceleration time td for decelerating the object, velocity variation ΔVain the acceleration time (velocity to be changed for each time intervalΔta), and velocity variation ΔVd in the deceleration time (velocity tobe changed for each time interval Δtd) are set in a register in thearithmetic circuit 8 in FIG. 2, using a S/W (Soft Wear).

[0038] The velocity variation ΔVa in the acceleration time and thevelocity variation ΔVd in the deceleration time are optional values, andare given by using an arithmetic program or the like, so that the objectsmoothly accelerates or decelerates. Further, VB may be 0, and when theinitial velocity and the terminal velocity are different, the terminalvelocity value needs only be put in the bias velocity VB.

[0039] At step S2, the arithmetic circuit 8 calculates thedeceleration-start distance YSd based on the data specified at step S1.

[0040] How the deceleration-start distance YSd is calculated(hereinafter, “the calculation method”) will now be explained whilereferring to FIG. 4 and FIG. 5.

[0041]FIG. 4 shows the relationship between the velocity of the objectand time, and a product of velocity and time becomes the distance ofmovement of the object. The acceleration and deceleration gradientsshown in FIG. 4 are actually step-wise as shown in FIG. 5. In FIG. 5, αddenotes a division number of the deceleration time, A denotes a divisionnumber of a velocity difference |VS−VB| (the number of steps in thevelocity). The number of steps A in the velocity is, as shown in FIG. 5,the number of times when the object is decelerated by the velocityvariation ΔVd in the deceleration time for each time interval Δtd, untilcurrent velocity of the object is decelerated to the bias velocity VB.Therefore, the object is decelerated once, at the time of reaching thedeceleration-start distance, and thereafter, decelerated αd times foreach time Δtd. As a result, the number of steps A in the velocity keepsthe relationship of A=αd+1.

[0042] The control and calculation method of the deceleration-startdistance uses a computational expression of arithmetic series (alsoreferred to as arithmetic progression) (this is used when calculatingthe distance of the oblique line portions in FIG. 5). Here, theacceleration and deceleration gradients are set such that tolerance=1,and the first term=1. Particularly, the case of tolerance=1 and thefirst term=1 is also referred to as Pythagorean triangular numbers.

[0043] Since the integer part of the deceleration-start distance YSd isYSdq, and the decimal part of the deceleration-start distance YSd isYSdr, the deceleration-start distance YSd can be expressed asYSd=YSdq+YSdr.

[0044] In other words, when it is assumed that the deceleration-startdistance YSd is 100.5 pulses, the integer part of the deceleration-startdistance YSd is 100 pulses, and the decimal part of thedeceleration-start distance YSd is 0.5 pulse.

[0045] Since the decimal part YSdr of the deceleration-start distanceYSd is 0.5 pulse, the YSdR obtained by rounding off the decimal partYSdr of the deceleration-start distance YSd becomes D2 from FIG. 3.

[0046] Since the integer part YSdq of the deceleration-start distanceYSd does not exceed the distance YS until the object is stopped,0≦YSdq≦YS is established, and YSdR obtained by rounding off the decimalpart YSdr of the deceleration-start distance YSd becomes 0≦YSdR≦(D1−1),since D1 is subtracted from the result of addition θ1, when the resultof addition becomes θ1≧D1.

[0047] The integer part YSdq of the deceleration-start distance YSd isin a unit of one pulse, and the result of addition θ1 increases by Vp/D1pulse. Therefore, YSdR obtained by rounding off the decimal part YSdr ofthe deceleration-start distance YSd is set to a unit of 1/D1 pulse, bytaking the minimum unit.

[0048] Since the deceleration-start distance is a distance until theobject starts to decelerate, when the current value of the objectreaches the deceleration-start distance, deceleration is started.

[0049] In other words, the object starts to decelerate, when the currentvalue (the integer part of the number of output pulse) reaches thedeceleration-start distance YSdq in a unit of one pulse (integer part),and the result of addition θ1 (the decimal part of the number of outputpulse) becomes equal to or greater than the YSdR obtained by roundingoff the decimal part YSdr of the deceleration-start distance YSd in aunit of 1/D1 pulse (decimal part).

[0050] The deceleration-start distance YSd can be calculated bysubtracting the deceleration part Yd from the distance YS until theobject is stopped, as shown in FIG. 4.

[0051] The deceleration part Yd is obtained by removing the area of theoblique line portion, that is, a distance is removed from a distance ifthe deceleration was constant, from the area (distance) when the objectis shifted by the deceleration time (Δtd/fc [sec]×αd [pcs])˜td (sec) ata velocity VS in FIG. 5 . . . (1)

[0052] Since the number of (ΔVd×Δtd/fc) in the oblique line portion isin the arithmetic series of tolerance=1 and the first term =1, such as1, 2, 3, 4 from the left, (4×(4+1))/2=10 [pcs] is established from theformula.

[0053] Therefore, when generalized, the area of the oblique line portionbecomes:

(ΔVd×Δtd/fc)×(αd×(αd+1))/2[pulse]  (2)

[0054] In this method, the number of groups of pulse, (ΔVd×Δtd/fc), iscalculated by using the arithmetic series.

[0055] Generally, the formula of the arithmetic series cannot be usedfor the calculation of a value including a decimal fraction. However,since it is when the number of groups of pulse, (ΔVd×Δtd/fc), iscalculated that the formula of the arithmetic series is used, even whenthe value of (ΔVd×Δtd/fc) includes a value of decimal fraction, thearithmetic series can be used. As a result, the number of pulse in thedecimal fraction can be taken into consideration.

[0056] From the above, a computational expression for thedeceleration-start distance YSd is shown.

[0057] It is assumed such that fc=control frequency [Hz], VS=targetvelocity [pulse/sec], Δtd/fc=time [sec] for changing the velocity,αd=division number of time, or (division number of velocity—1) [pcs].

[0058] The velocity variation ΔVd [pulse/sec] in the deceleration timeis obtained by dividing the velocity difference |VS−VB|by (αd+1). Hence,the result may include a decimal fraction, according to the value of(αd+1). Therefore, the velocity variation ΔVd is expressed by using theminimum velocity, so that a value of decimal fraction does not appear inthe computational expression for the deceleration-start distance.

[0059] Since the variable frequency pulse generation circuit 9 generates1/D1 =1/(fc×n) pulse in 1/fc second, the minimum velocity becomesD1/fc=1/n [pulse/sec]=1 [[(1/n) pulse/sec].

[0060] Since the velocity variation ΔVd [pulse/sec] can be expressed asΔVd

[pulse/sec]=ΔVd×n[(1/n) pulse/sec],

[0061] from the minimum velocity D1/fc=1/n [pulse/sec]=1 [(1/n)pulse/sec].

αd is calculated as follows from A=αd+1=(VS−VB)/ΔVd:

αd=(rounding up of the decimal part of (VS−VB)×n/ΔVd×n)−1[pcs].

[0062] When ΔVd=0, there is no velocity change in the deceleration time,and this means that the object does not decelerate. That is, since thereis no deceleration time, αd=0.

[0063] In the computational expression, when 0 is substituted in ΔVd,being the denominator, the numerator is divided by 0, and hence αdbecomes infinity. Therefore, when ΔVd=0, αd is made to 0.

[0064] Δtd is calculated in the following manner, from td=αd×Δtd/fc.

[0065] Since the variable frequency pulse generation circuit 9 generatesthe output pulse for each 1/fc time, when td [sec] is unit-converted totd×fc [in unit of 1/fc sec],

Δtd=(quotient of (td×fc)/αd) [in unit of 1/fc sec].

[0066] When αd=0, since there is no deceleration time, Δtd=0.

[0067] Since the surplus of ((td×fc)/αd) is rounded off, the value ofΔtd obtained from the computational expression does not always satisfyΔtd/fc×αd=td, and the value of Δtd/fc×αd takes a value in the vicinityof the deceleration time td, and the following expression isestablished:

(td−minimum value of Δtd×αd)<(Δtd/fc×αd)≦td.

[0068] In order to decrease an error, the minimum value of Δtd needsonly to be decreased, and this means to decrease 1/fc, and increase fc.

[0069] Therefore, the distance Yd of the deceleration portion iscalculated in the following manner, from the expressions (1) and (2):$\begin{matrix}{{Yd} = \left( {{area}\quad {when}\quad {the}\quad {object}\quad {is}\quad {shifted}\quad {by}\quad {the}\quad {time}} \right.} \\{\left. {\left( {\Delta \quad {{td}/{fc}} \times \alpha \quad d} \right)\quad {at}\quad {the}\quad {velocity}\quad {VS}} \right) -} \\{\left( {{are}\quad a\quad {of}\quad {the}\quad {oblique}\quad {line}\quad {portion}\quad {in}\quad {{Fig}.\quad 5}} \right)} \\{= {\left( {{VS} \times \left( {\Delta \quad {{td}/{fc}} \times \alpha \quad d} \right)} \right) - {\left( {\Delta \quad {Vd} \times n \times \Delta \quad {{td}/{fc}}} \right) \times}}} \\{\left. {\left( {\alpha \quad d \times \left( {{\alpha \quad d} + 1} \right)} \right)/2} \right)/{{n\quad\lbrack{pulse}\rbrack}.}}\end{matrix}$

[0070] When it is assumed that ΔVd×n [(1/n) pulse/sec], and Δtd/fc [sec]is rounded off based on 1/fc [sec], it is expressed as Δtd [1/fc sec].

[0071] When this expression is sorted out, $\begin{matrix}{{Yd} = {\left( {{VS} \times \left( {\Delta \quad {{td}/{fc}}} \right) \times \alpha \quad d} \right) - {\left( {\Delta \quad {Vd} \times n \times \Delta \quad {{td}/{fc}}} \right) \times}}} \\{\left. \left. {\left( {\alpha \quad d \times \left( {{\alpha \quad d} + 1} \right)} \right)/2} \right) \right)/n} \\{= \left( {\left( {2 \times {VS} \times n \times \Delta \quad t\quad d \times \alpha \quad d} \right) - {\left( {\Delta \quad {Vd} \times n \times \Delta \quad {td} \times \alpha \quad d \times \left( {{\alpha \quad d} + 1} \right)} \right)/}} \right.} \\{\left( {2 \times f\quad c \times n} \right)} \\{= \left( {\left( {2 \times {VS} \times n} \right) - {\left( {\Delta \quad V \times n \times \left( {{\alpha \quad d} + 1} \right)} \right) \times {\left( {\Delta \quad t\quad d \times \alpha \quad d} \right)/}}} \right.} \\{{\left( {2 \times f\quad c \times n} \right)\quad\lbrack{pulse}\rbrack}}\end{matrix}$  (∴ Δ  t  d  is  [in  a  unit  of  1/f  c  sec ])

[0072] Therefore, the deceleration-start distance YSdq in a unit of onepulse (integer part) is calculated as follows: $\begin{matrix}{{{YSdq} = {{integer}\quad {part}\quad {{{of}\left( {{YS} - {Yd}} \right)}\left\lbrack {{in}\quad a\quad {unit}\quad {of}\quad {one}\quad {pulse}} \right\rbrack}}}\quad} \\{= {{quotient}\quad {{of}\left( {{2 \times {fc} \times n \times {YS}} -} \right.}}} \\{{\left( {{2 \times {VS} \times n} - {\Delta \quad {Vd} \times n \times \left( {{\alpha \quad d} + 1} \right)}} \right) \times}} \\{{\left. {\Delta \quad {td} \times \alpha \quad d} \right)/\left( {2 \times f\quad c \times n} \right)} \geq {{0\quad\lbrack{pulse}\rbrack}.}}\end{matrix}$

[0073] In the case of the calculation result of YSdq<0, since YSdq isthe deceleration-start distance of the object, it does not becomenegative, and hence YSdq=0.

[0074] When YS=0, then YSdq≧0.

[0075] A computational expression for YSdR obtained by rounding off thedeceleration-start distance YSdr in a unit of 1/D1 pulse (decimal part)is shown below. Here, the result of addition θ1 is an integer, it isnecessary to round off the decimal part of (YS−Yd) to the nearestinteger.

[0076] Therefore, the decimal part YSdr of (YS−Yd) is multiplied by(2×fc×n),to determine the surplus of(2×fc×n×YS−(2×VS×n−ΔVd×n×(αd+1))×Δtd×αd)/(2×fc×n).

[0077] However, the deceleration-start distance YSdr is in a unit of1/D1 pulse, and D1=(fc×n), and hence in order to make it in a unit of1/(fc×n) pulse, the surplus of (2×fc×n×YS−(2×VS×n−ΔVd×n×(αd+1))×Δtd×αd)/(2×fc×n) is divided by 2.

[0078] Therefore, $\begin{matrix}{{YSdR} = {\left( {{decimal}\quad {part}\quad {YSdr}\quad {{of}\left( {{YS} - {Yd}} \right)}} \right) \times {\left( {2 \times f\quad c \times n} \right)/2}}} \\{= {{quotient}\quad {{of}\left( {{surplus}\quad {{of}\left( {{2 \times f\quad c \times n \times {YS}} -} \right.}} \right.}}} \\{\left. {\left( {{2 \times {VS} \times n} - {\Delta \quad {Vd} \times n \times \left( {{\alpha \quad d} + 1} \right)}} \right) \times \Delta \quad {td} \times \alpha \quad d} \right)/} \\{{{\left( {2 \times f\quad c \times n} \right)/2} \geq {{0\quad\left\lbrack {\left( {1/\left( {f\quad c \times 2} \right)} \right)\quad {pulse}} \right\rbrack}.}}}\end{matrix}$

[0079] In the case of the calculation result of YSdr<0, since YSdr isthe deceleration-start distance of the object, it does not becomenegative, and hence YSdR=0.

[0080] When YS=0, then YSdR≧0.

[0081] By using the above expression, before the velocity instruction isissued to the variable frequency pulse generation circuit 9, thedeceleration-start distance YSd (=YSdq+YSdr) can be calculated, andhence it is not necessary to calculate the distance YS with respect tothe acceleration region, the target velocity region, and thedeceleration region, every time the arithmetic circuit 8 issues avelocity instruction.

[0082] The arithmetic circuit 8 in FIG. 2 gives a velocity instructionto the variable frequency pulse generation circuit 9, after calculationof the deceleration-start distance YSd (=YSdq+YSdr).

[0083] The variable frequency pulse generation circuit 9 having receivedthe velocity instruction generates a pulse by comparing the result ofaddition θ1 of the adder with the two reference values D1 and D2, andoutputs the pulse.

[0084] At this time, the position control circuit 10 counts the outputpulse of the variable frequency pulse generation circuit 9, and thecount result becomes the current value (the integer part of the outputpulse) of the object.

[0085] Thereafter, at step S3, the variable frequency pulse generationcircuit 9 occasionally changes the frequency of the output pulse foreach time interval Δta determined by the arithmetic circuit 8, tooccasionally accelerate the velocity of the object from the initialvelocity.

[0086] At step S4, the arithmetic circuit 8 compares the number of timesof acceleration until the velocity of the object reaches the targetvelocity (the number of steps in the velocity A=αd+1) with the number oftimes the object is actually accelerated, that is, the number ofvelocity instructions given to the variable frequency pulse generationcircuit 9, in order to judge whether the velocity of the object reachesthe target velocity. When the comparison result agrees, control proceedsto step S5.

[0087] At step S5, the arithmetic circuit 8 issues a velocityinstruction to the variable frequency pulse generation circuit 9, tochange the current velocity to the target velocity.

[0088] At step S6, the position control circuit 10 occasionally comparesthe current value (number of output pulse) with the integer part YSdq ofthe deceleration-start distance, and θ1, being the result of the adder(number of output pulse of decimal fraction) with YSdR obtained byrounding off the decimal part YSdr of the deceleration-start distance,in order to judge the deceleration-start distance of the object. Whenthe current value reaches the deceleration-start distance (currentvalue≧YSdq, and θ1≧YSdR), control proceeds to step S7.

[0089] At step S7, the positioning control circuit 10 gives adeceleration signal to the variable frequency pulse generation circuit9, to start deceleration.

[0090] The variable frequency pulse generation circuit 9 occasionallydecelerates from the target velocity for each determined time intervalΔtd (which does not depend on the acceleration time), according to thedeceleration gradient instructed from the arithmetic circuit 8, andafter having decelerated for αd times, keeps the velocity.

[0091] The positioning control circuit 10 occasionally compares thecurrent value with the distance YS until the object is stopped, and asshown by 14 in FIG. 4, when the current value reaches the distance YSuntil the object is stopped, gives a stop signal to the variablefrequency pulse generation circuit 9. The variable frequency pulsegeneration circuit 9 stops pulse output.

[0092] In the first embodiment, an example of using a variable frequencypulse generation circuit has been explained, but needless to say, afixed frequency pulse generation circuit can be used. The currentvelocity may be compared with the target velocity, instead of comparingthe number of steps in the velocity with the number of acceleration.

[0093] An example of arithmetic series of tolerance=1 and the firstterm=1 has been explained, but in other examples, the deceleration-startdistance YSd can be calculated by using the series. These positioningcontrol apparatus can obtain the similar functions by using anarithmetic program.

[0094] According to the first embodiment, since YSd is obtained withoutusing a value of acceleration time, when calculating thedeceleration-start distance, deceleration time and velocity variation(deceleration gradient) can be set independently of the accelerationtime, even when the initial velocity and the terminal velocity aredifferent.

[0095] Since the deceleration-start distance is not judged by a break inthe fixed control cycle (several ms), but controlled by the number ofpulse of decimal fraction, deceleration can be started at an optimumtiming fc (several tens ns).

[0096] Since the deceleration-start distance can be calculated by onecomputational expression using the formula of series, calculation ofdistance with respect to the acceleration region, the target velocityregion, and the deceleration region is not required. Thereby, the loadon the arithmetic circuit can be suppressed, enabling position controlof many objects to be controlled with less arithmetic circuit.

[0097] When switching of the acceleration region, the target velocityregion, and the deceleration region is performed, since a comparison ismade between the number of steps in the velocity and the number of timesof acceleration of the object, the number of circuit s and gates can bereduced, as compared with the case when the current velocity and thetarget velocity are compared. When a complicated control is required,such as when the velocity is changed during acceleration ordeceleration, a comparison of velocity is only necessary.

[0098] Since only the distance of the calculated deceleration-startdistance has to be stored, a memory space for storing the distanceallocated in the acceleration region, the target velocity region, andthe deceleration region is not required.

[0099] Since only a simple control such as a comparison and calculationis performed, with respect to from the pulse control to the switchingmethod of velocity, the control can be easily realized by an arithmeticprogram.

[0100] Even when the number of pulse of decimal fraction is included inthe deceleration-start distance, the deceleration-start distance can becalculated by performing calculation of the number of (ΔVd×Δtd/fc),using the formula of series, by designating a group of real number ofpulse of (ΔVd×Δtd/fc).

[0101] Since the present invention is constructed as explained above,effects described below can be exhibited.

[0102] The deceleration-start distance YSd is obtained as a sum of aninteger part YSdq of the deceleration-start distance and a decimal partYSdr of the deceleration-start distance, to manage the decimal fractionwith respect to the pulse generation unit that outputs the output pulsecorresponding to the velocity instruction. Therefore, at the time ofcalculation of the deceleration-start distance, the deceleration timeand the velocity variation (deceleration gradient) can be setindependently of the acceleration time set by a user, without using thevalue of the acceleration time, enabling correspondence even when theinitial velocity and the terminal velocity are different. As a result,accurate positioning becomes possible by managing the deceleration-startdistance by the number of pulse of decimal fraction.

[0103] Since the deceleration-start distance can be calculated by acomputational expression using the formula of series, calculation of adistance with respect to the acceleration region, the target velocityregion, and the deceleration region is not required, thereby reducingthe load on the arithmetic circuit.

[0104] Industrial Applicability

[0105] As described above, the positioning control method according tothe present invention is suitable for controlling the position of anobject, such as a stepping motor and a servomotor.

1. A positioning control method for controlling the position of anobject, based on a distance YS until the object is stopped, a targetvelocity VS of the object, acceleration time ta for accelerating theobject, deceleration time td for decelerating the object, velocityvariation ΔVa within the acceleration time, and velocity variation ΔVdwithin the deceleration time, wherein a deceleration-start distance YSd,being a distance until deceleration of the object is started, isdetermined as a sum of an integer part YSdq of the deceleration-startdistance and a decimal part YSdr of the deceleration-start distance, toperform management of decimal fractions, with respect to a pulsegeneration unit that outputs an output pulse corresponding to thevelocity instruction.
 2. The positioning method according to claim 1,wherein a computational expression of arithmetic series is used for thecalculation of the deceleration-start distance YSd.
 3. The positioningcontrol method according to claim 1, wherein a comparison is madebetween YSdR obtained by rounding off the decimal part YSdr of thedeceleration-start distance to the nearest integer and an result ofaddition θ1 obtained by adding the velocity set value (Vp×n) for each1/fc (fc: control frequency) time, and a deceleration start instructionis issued to the pulse generation unit, with establishment of θ1≧YSdR,and with establishment of the current value≧YSdR.
 4. The positioningcontrol method according to claim 3, wherein the integer part YSdq ofthe deceleration-start distance and the YSdR obtained by rounding offthe decimal part YSdr to the nearest integer are determined by thefollowing equation: $\begin{matrix}{{YSdq} = {{quotient}\quad {{of}\left( {{{YS} \times 2 \times n \times f\quad c} - \left( {{{VS} \times 2 \times n} - {\Delta \quad V \times}} \right.} \right.}}} \\{{\left. {\left. \left( {{\alpha \quad d} + 1} \right) \right) \times \Delta \quad {td} \times \alpha \quad d} \right)/\left( {f\quad c \times 2 \times n} \right)} \geq 0}\end{matrix}$ $\begin{matrix}{{YSdR} = {{quotient}\quad {{of}\left( {{surplus}\quad {{of}\left( {{{YS} \times 2 \times n \times f\quad c} -} \right.}} \right.}}} \\{{\left( {{{VS} \times 2 \times n} - {\Delta \quad V \times \left( {{\alpha \quad d} + 1} \right)}} \right) \times}} \\{{\left. {\left. {\Delta \quad {td} \times \alpha \quad d} \right)/\left( {f\quad c \times 2 \times n} \right)} \right)/2} \geq 0}\end{matrix}$

where n denotes the number of seconds, when the minimum velocity of theoutput pulse is set to 1/n [pulse/sec], and αd is a division number ofdeceleration time td into Δtd.